//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package org.yaukie.base.redis;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;

public abstract class CacheManager<K, V> extends ConcurrentHashMap<K, V> {
    public static ObjectMapper mapper = new ObjectMapper();

    public CacheManager() {
    }

    public abstract void setCacheObject(final K key, final V value);

    public abstract void setCacheObject(final K key, final V value, final Integer timeout, final TimeUnit timeUnit);

    public abstract boolean expire(final K key, final long timeout);

    public abstract boolean expire(final K key, final long timeout, final TimeUnit unit);

    public abstract <V> V getCacheObject(final K key);

    public abstract boolean deleteObject(final K key);

    public abstract long deleteObject(final Collection<K> collection);

    public abstract long setCacheList(final K key, final List<V> dataList);

    public abstract <V> List<V> getCacheList(final K key);

    public abstract <V> long setCacheSet(final K key, final Set<V> dataSet);

    public abstract <V> Set<V> getCacheSet(final K key);

    public abstract void setCacheMap(final K key, final Map<K, V> dataMap);

    public abstract <V> Map<K, V> getCacheMap(final K key);

    public abstract <V> void setCacheMapValue(final K key, final K hKey, final V value);

    public abstract <V> V getCacheMapValue(final K key, final K hKey);

    public abstract <V> List<V> getMultiCacheMapValue(final K key, final Collection<Object> hKeys);

    public abstract Set<Map<K, V>> keys(final K pattern);

    static {
        mapper.enable(SerializationFeature.INDENT_OUTPUT);
        mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
    }
}
